const http=require("http");
const router=require("./router");
const server=http.createServer(function(request,response){
    // console.log(router);//{"/":findUser函数}

    let path=request.url;//  /
    let fun=router[path];//router["/"]  router["/dsdopaodpadsds"]
    let temp=fun?fun():"<h3>404 not found</h3>";
    response.end(temp);

});

server.listen(3000);